package domain.service.event;

import domain.dao.event.EventMessageInfoDao;
import domain.entity.event.EventMessageInfo;
import org.apache.ibatis.type.Alias;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.Serializable;

/**
 * Created by bowen on 2017-08-17.
 */
@Service
public class EventMessageInfoService {

    @Autowired
    private EventMessageInfoDao infoDao;

    public void create(EventMessageInfo messageInfo) {
        infoDao.create(messageInfo);
    }

    public int getTotalUnread(String userId){
        return infoDao.getTotalUnread(userId);
    }

    public int getMyTotalUnread(String userId){
       return infoDao.getMyTotalUnread(userId);
    }

    public int getAtTotalUnread(String userId){
        return infoDao.getAtTotalUnread(userId);
    }

    public int getPublicTotalUnread(String userId){
        return infoDao.getPublicTotalUnread(userId);
    }

}
